object practise1 {
  def main(args: Array[String]): Unit = {

    def averageOfListBelow(list: List[Int], n: Int) : Double = {
      val filteredList = list.filter(_ < n)
        if (filteredList.isEmpty){
          0
        }
        else{
          filteredList.sum.toDouble/filteredList.length.toDouble
        }
    }

  }
}
